using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using VOL.Entity.DomainModels;

namespace VOL.demo.Repositories
{
    public partial class producttypemodelRepository
    {
        /// <summary>
        /// 获取所有货品类型（级联结构）
        /// </summary>
        /// <returns></returns>
        public async Task<List<producttypemodel>> GetCascadeListAsync()
        {
            return await base.SqlSugarClient.Queryable<producttypemodel>()
                .OrderBy(x => x.parentId)
                .OrderBy(x => x.id)
                .ToListAsync();
        }
    }
}
